package com.example.basicdemo.model.builder;

import com.isyscore.os.dev.api.IsyscoreRequestBuilder;
import com.isyscore.os.dev.util.IsyscoreHashMap;
import com.isyscore.os.dev.util.RequestUtils;

import javax.servlet.http.HttpServletRequest;

public class PageDataAuthRequestBuilder extends IsyscoreRequestBuilder {
    private IsyscoreHashMap headers;


    /**
     * 功能角色名称
     */
    private String aclName;

    /**
     * 应用标识码列表
     */
    private String appCodes;

    /**
     * 数据权限角色名称
     */
    private String authName;

    /**
     * 最近修改时间
     */
    private String gmtModified;

    /**
     * 页码
     */
    private Integer pageNo;

    /**
     * 页尺寸
     */
    private Integer pageSize;

    public String getAclName() {
        return aclName;
    }

    public PageDataAuthRequestBuilder setAclName(String aclName) {
        this.aclName = aclName;
        return this;
    }

    public String getAppCodes() {
        return appCodes;
    }

    public PageDataAuthRequestBuilder setAppCodes(String appCodes) {
        this.appCodes = appCodes;
        return this;
    }

    public String getAuthName() {
        return authName;
    }

    public PageDataAuthRequestBuilder setAuthName(String authName) {
        this.authName = authName;
        return this;
    }

    public String getGmtModified() {
        return gmtModified;
    }

    public PageDataAuthRequestBuilder setGmtModified(String gmtModified) {
        this.gmtModified = gmtModified;
        return this;
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public PageDataAuthRequestBuilder setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
        return this;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public PageDataAuthRequestBuilder setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
        return this;
    }

    public IsyscoreHashMap getHeaders() {
        return headers;
    }

    public PageDataAuthRequestBuilder setHeaders(IsyscoreHashMap headers) {
        this.headers = headers;
        return this;
    }

    @Override
    public boolean validate() {
        return true;
    }

    @Override
    public IsyscoreRequestBuilder setRequestHeader(HttpServletRequest request) {
        this.headers = RequestUtils.getRequestHeader(request);
        return this;
    }
}
